package cn.cau.epidemicsurveysystem.service.impl;

import cn.cau.epidemicsurveysystem.bean.DiseaseInfoBean;
import cn.cau.epidemicsurveysystem.dao.DiseaseInfoRepository;
import cn.cau.epidemicsurveysystem.service.DiseaseInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @projectName: gp2022
 * @package: cn.cau.epidemicsurveysystem.service.impl
 * @className: DiseaseInfoServiceImpl
 * @author: zfy
 * @description: TODO
 * @date: 2022/3/4 0004 9:09
 * @version: 1.0
 */
@Service
public class DiseaseInfoServiceImpl implements DiseaseInfoService {

    @Autowired
    DiseaseInfoRepository diseaseInfoRepository;

    @Override
    public DiseaseInfoBean findDiseaseInfoBeanByDiseaseName(String diseaseName) {
        return diseaseInfoRepository.findDiseaseInfoBeanByDiseaseName(diseaseName);
    }

    @Override
    public DiseaseInfoBean save(DiseaseInfoBean diseaseInfoBean) {
        return diseaseInfoRepository.save(diseaseInfoBean);
    }
    @Override
    public List<DiseaseInfoBean> findAll(){
        return diseaseInfoRepository.findAll();
    }
}
